There are two types of rivets commonly used in metal aircraft: blind or "pop" rivets, and solid rivets. For the sake of simplicity, I'm going to assume that we all know how pop rivets work, and I'm going to focus on solid rivets...because I believe that's where most of the confusion lies. And I'm also going to keep this discussion aimed at metal aircraft, specifically the Van's RV series. Most metal aircraft all use the same types of rivets, so hopefully this will apply whether you're building an RV or just repairing a production aircraft (although if that's the case you're probably an A&P and already understand all of this).

Riveting is just like that. On one end, you've got the rivet gun. On the other end you've got a bucking bar, which is just a chunk of steel of some convenient shape and mass, with a smooth striking surface. In the middle is the rivet itself. The pneumatic rivet gun impacts the rivet, which acts as a medium and sends the impulse through to the bucking bar resting on the other end. The bucking bar, while it doesn't "swing" like the end ball in the diagram above, reflects the impact right back at the rivet shank. With the gun held firmly on the rivet and the bucking bar held stable on the other end, with every impact the rivet gun sends to the other side, the force is reflected by the bucking bar, the rivet experiences "repetitive compression," and the rivet shank deforms (intentionally).
That's about as best as I can explain the physics of riveting...at least when shooting and bucking is involved. There are some obvious exceptions, such as back riveting, which is where the rivet gun is used to drive the rivet against a "backing plate" that remains stationary. Another exception is when rivets are squeezed (compressed with force on both sides). In any case, my analogy for shooting and bucking might be off slightly, but that's how I understand it. There's a little more to it, including operating the rivet gun at a pressure and frequency that's appropriate to the size of the rivet, using a bucking bar with an appropriate mass and shape, etc. But that all comes down to technique and preference. Below I'll provide some data points on the various operating pressures I use for different applications.
If you've read through my builder's log, you've probably heard me mention AN426 and AN470 all over the place. Well, the rivet head style is what those numbers refer to. "AN" stands for "Army/Navy" (alternatively "Air Force/Navy" according to some sources). You may also see these rivets referred to using their "MilSpec" identification, such as MS20426 or MS20470, where "MS" stands for "Military Standard specification." These are interchangeable and mean the same thing...although, the MilSpec system is the more modern conversion, and as new hardware is conceived it's added as MS-such-and-such since the AN system is being phased out. To add confusion, there's also the "NAS" system, which stands for "National Aerospace Standards," which I heard was used in the Korean War era and has been superseded by the MilSpec system. As far as solid rivets on the Van's RVs are concerned, we use the "AN" prefix and keep it simple.

You'll notice that AN426 rivets have 100-degree countersunk heads. This 100-degree number is kind of important. If you know anything about aircraft tools, you know that they're very rarely interchangeable with any other types of tools, namely automotive and industrial. You need to use 100-degree countersinks, 37-degree flares (as opposed to automotive 45-degree flares), etc. Be careful. But I digress...the point is just that AN426 rivets have that countersunk head, which sits flush in the respective countersink in the material (i.e. a dimple or machine countersink).
Two types of rivets, done deal, right? No way. It breaks down into further levels of granularity based on a few different attributes. Here's a photo of a couple of different types of rivets, and their full rivet numbers are shown.

What does all this "AD4-9" stuff at the end of the number mean? It breaks down into alloy, diameter (although "AD" does NOT stand for "alloy diameter"), and length. The "AD" just happens to mean that the rivet is aluminum alloyed with copper to produce a 2117T4 alloy. Here's a table showing the common rivet alloy designations.

Do we really care that 2117T4 is the alloy? Not really. All you need to do is make sure the rivet has that little dimple in the head and you know you've got an "AD" rivet. I've never even seen the other styles in any of the aircraft I've had exposure to. The dimple actually serves a coincidentally important role to boot...if you need to drill one of these rivets out, the dimple gives you a nice little pre-punched centering guide!
Ok, so we now know that an AN470AD4-9 rivet has a round head with a little dimple, alloyed with copper, etc. Cool. What's the "4-9" at the end? That designates the diameter and length. "4" is the rivet diameter in 32nds of an inch...thus 1/8". "9" is the rivet length in 16ths of an inch, thus the rivet is 9/16" long. Why do they use 32nds for diameter and 16ths for length? Don't ask me...bolts are the same way, although they use 16ths for diameter and 8ths for length. Whatever. Some "experts" came up with the system, and as confusing or nonsensical as it might be, get used to it. So based on this system, we know that the AN426AD4-5 rivet has a countersunk head, is a copper alloy, is 1/8" in diameter and 5/16" in length. There you go.
Why are diameter and length important? I assume the purpose of length is obvious to you...you've got various thicknesses of stuff to rivet, and I'll go into more detail on that in a minute. Diameter is very important, mostly as a factor of the amount of shear and tensile strength the rivet provides. But there's a side effect of using different rivet diameters...rivet diameter dictates where rivets can be located relative to each other and also relative to edges of the material you're riveting. The following diagram shows the minimum and maximum rivet pitch and edge spacing, which are all a function of the rivet's diameter. In case it's not obvious, the "D" used in this image refers to the diameter.



Hey, and while I'm at it, let's talk about terminology for a second. You might hear the terms "shop head" and "manufactured head." The easy way to know which is which is like this...the manufactured head is the head that comes pre-made by the manufacturer (i.e. the round or countersunk end), and the shop head is the head you make in your shop. Simple enough, right? The shop head is also sometimes referred to as the "bucktail."
How do you measure a driven rivet? Well, there are rivet gauges for this specific purpose. One side of the gauge measures the driven diameter, and the other measures the driven height. The four gauges on the left measure various diameter rivets, ranging from 3- (3/32" diameter, i.e. AN426AD3-4) to 6- (6/32" diameter, i.e. AN470AD6-11). The gauge on the right is used to measure a rivet's protruding length before being driven. While you can usally eyeball a properly or improperly driven rivet (after much practice), these tools are invaluable when you are unsure.

AN426 Rivets:
| Rivet Type | Air Pressure | Duration |
|---|---|---|
| AN426AD3-3 to 3-4 | 34 psi | 1 second |
| AN426AD3-4.5 to 3-5 | 37 psi | 1 ½ seconds |
| AN426AD3-6 plus | 40 psi | 1 ½ seconds |
| AN426AD4-4 to 4-5 | 45 psi | 1 second |
| AN426AD4-6 to 4-9 | 50 psi | 1 ½ to 2 seconds |
AN470 Rivets:
| Rivet Type | Air Pressure | Duration |
|---|---|---|
| AN470AD4-4 to 4-5 | 60 psi | 1 second |
| AN470AD4-6 to 4-7 | 60 psi | 1 ½ seconds |
| AN470AD4-8 to 4-9 | 75 psi | 1 ½ seconds |
| AN470AD4-9 plus | 80 psi | 1 ½ to 2 seconds |